package com.gopay.common.domain.cps.gp;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * P2P签约协议信息
 * @CpsGpContractInfo.java
 * @author lizheng
 * @2014-4-18 下午3:24:20  www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "CPS_P2P_CONTRACT_INFO")
public class CpsGpContractInfo implements java.io.Serializable {
    private static final long serialVersionUID = -8024140279979121024L;

    /**
     * 信息流水号
     */
    private int infoSq;

    /**
     * 协议号
     */
    private String contractId;

    /**
     * P2P平台国付宝客户ID
     */
    private String platCustId;

    /**
     * P2P平台托管账号
     */
    private String trustAcct;

    /**
     * 专属账户国付宝客户ID
     */
    private String excluCustId;

    /**
     * 专属账户账号
     */
    private String excluAcct;

    /**
     * 交易会员账户类型1 - 个人 2 - 企业
     */
    private int excluAcctType;

    /**
     * 协议状态1 - 已签约 2 - 已解约
     */
    private int contractStatus;

    /**
     * 创建时间
     */
    private Date createdTs;

    /**
     * 记录最后修改时间
     */
    private Date lastUpdTs;

    /**
     * 最后修改交易码
     */
    private String lastUpdTrancode;
    /**
     * 是否自动转账
     */
    private int autoTransfer;
    
    /**
     * 单笔限额
     */
    private BigDecimal perLimit;
    /**
     * 单日限额
     */
    private BigDecimal dayLimit;
    /**
     * P2P平台风险金账号
     */
    private String riskAcct;
    @Id
    @SequenceGenerator(name = "CpsP2pContractInfoSequence", sequenceName = "CPS_P2P_CONTRACT_INFO_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CpsP2pContractInfoSequence")
    @Column(name = "INFO_SQ", unique = true, nullable = false)
    public int getInfoSq() {
        return this.infoSq;
    }

    public void setInfoSq(int infoSq) {
        this.infoSq = infoSq;
    }

    @Column(name = "CONTRACT_ID", nullable = false, length = 18)
    public String getContractId() {
        return this.contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }
    @Column(name = "PLAT_CUST_ID", nullable = false, length = 10)
    public String getPlatCustId() {
        return platCustId;
    }

    public void setPlatCustId(String platCustId) {
        this.platCustId = platCustId;
    }

    @Column(name = "TRUST_ACCT", nullable = false, length = 19)
    public String getTrustAcct() {
        return trustAcct;
    }

    public void setTrustAcct(String trustAcct) {
        this.trustAcct = trustAcct;
    }

    @Column(name = "EXCLU_CUST_ID", nullable = false, length = 10)
    public String getExcluCustId() {
        return excluCustId;
    }

    public void setExcluCustId(String excluCustId) {
        this.excluCustId = excluCustId;
    }

    @Column(name = "EXCLU_ACCT", nullable = false, length = 19)
    public String getExcluAcct() {
        return excluAcct;
    }

    public void setExcluAcct(String excluAcct) {
        this.excluAcct = excluAcct;
    }

    @Column(name = "EXCLU_ACCT_TYPE", nullable = false, length = 1)
    public int getExcluAcctType() {
        return excluAcctType;
    }

    public void setExcluAcctType(int excluAcctType) {
        this.excluAcctType = excluAcctType;
    }

    @Column(name = "CONTRACT_STATUS", nullable = false, length = 1)
    public int getContractStatus() {
        return contractStatus;
    }

    public void setContractStatus(int contractStatus) {
        this.contractStatus = contractStatus;
    }

    @Column(name = "CREATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return this.createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return this.lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Column(name = "LAST_UPD_TRANCODE", length = 6)
    public String getLastUpdTrancode() {
        return this.lastUpdTrancode;
    }

    public void setLastUpdTrancode(String lastUpdTrancode) {
        this.lastUpdTrancode = lastUpdTrancode;
    }

    @Column(name = "AUTO_TRANSFER", nullable = false, length = 1)
    public int getAutoTransfer() {
        return autoTransfer;
    }

    public void setAutoTransfer(int autoTransfer) {
        this.autoTransfer = autoTransfer;
    }
    
    @Column(name = "PER_LIMIT", precision = 25, scale = 4)
    public BigDecimal getPerLimit() {
        return perLimit;
    }


    public void setPerLimit(BigDecimal perLimit) {
        this.perLimit = perLimit;
    }

    @Column(name = "DAY_LIMIT", precision = 25, scale = 4)
    public BigDecimal getDayLimit() {
        return dayLimit;
    }

    public void setDayLimit(BigDecimal dayLimit) {
        this.dayLimit = dayLimit;
    }
    
    @Column(name = "RISK_ACCT", nullable = false, length = 19)
    public String getRiskAcct() {
        return riskAcct;
    }

    public void setRiskAcct(String riskAcct) {
        this.riskAcct = riskAcct;
    }

}
